* {
  box-sizing: border-box;
}

body {
  background-color: skyblue;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  margin: 0;
}

.container {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 20px 40px;

  /* height: 50%; */
  border-radius: 5px;
}

.container h1 {
  text-align: center;
  margin-bottom: 30px;
}

.container a {
  text-decoration: none;
  color: lightblue;
}

.btn {
  cursor: pointer;
  display: inline-block;
  width: 100%;
  padding: 15px;
  background-color: lightblue;
  border: 0;
  border-radius: 5px;
  font-size: 16px;
}

.btn:focus {
  outline: 0;
}

.btn:active {
  transform: scale(0.90);
}

.text {
  margin-top: 30px;
}

.form-control {
  position: relative;
  margin: 20px 0 40px;
}

.form-control input {

  display: block;
  background-color: transparent;
  border: 0;
  border-bottom: 2px solid #fff;
  width: 100%;
  padding: 15px 0;
  color: #fff;
  font-size: 18px;
}

/* 聚焦和验证有数据时 */
.form-control input:focus,
.form-control input:valid {
  outline: 0;
  border-bottom-color: lightblue;
}

.form-control label {
  position: absolute;
  top: 15px;
  left: 0;
  /* 不会被点击事件触发 */
  pointer-events: none;
}

.form-control label span {
  display: inline-block;
  font-size: 18px;
  min-width: 5px;
  /* 贝塞尔曲线  分别代表起点和终点 前两个x1,y1起始点 后两个时x2y2代表终点 */
  transform: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.form-control input:focus+label span,
.form-control input:valid+label span {
  color: lightblue;
  transform: translateY(-30px);
}